<?php
/**
 * Sharing World table class
 * 
 * @package    Joomla.Tutorials
 * @subpackage Components
 * @link http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_4
 * @license		GNU/GPL
 */

// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

/**
 * Sharing Table class
 *
 * @package    Joomla.Tutorials
 * @subpackage Components
 */
class CongregationTableProvince extends JTable
{
	/**
	 * Primary Key
	 *
	 * @var int
	 */
	var $p_id = null;

	/**
	 * @var string
	 */
	var $p_name = null;
	var $p_info = null;
	var $ordering = null;
	/**
	 * Constructor
	 *
	 * @param object Database connector object
	 */
	function __construct(& $db) {
		parent::__construct('#__congregation_province', 'p_id', $db);
	}
	
	function check() {
		if (trim($this->p_name) == '') {
	      $this->_db->setError(JText::_('Please enter the Province\'s name'));
	      return false;
	    }
		
		return true;
	}	
}